package com.hzp.day51.biz;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.hzp.day51.dao.PositionMapper;
import com.hzp.day51.model.Position;



/**
 * @author hzp
 *
 */
@Service
public class PositionBiz {
	@Resource
	private PositionMapper positionMapper;
	public List<Position> findAll(){
		return positionMapper.selectAll();
	}
	public Position findById(int id){
		return positionMapper.selectByPrimaryKey(id);
	}
	public void save (Position pos){
		positionMapper.insert(pos);
	} 
	public void saveSelect (Position pos){
		positionMapper.insertSelective(pos);
	} 
	public void update(Position pos){
		positionMapper.updateByPrimaryKey(pos);
	}
	public void updateSelect (Position pos){
		positionMapper.updateByPrimaryKeySelective(pos);
	}
	public void delete (int id){
		positionMapper.deleteByPrimaryKey(id);
	}
}
